package net.biancheng.po;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Teacher extends User {
    private List<Integer> CourseNo=new ArrayList<>();
    private boolean[] teacherTime = new boolean[35];//在i个节次里有没有占用，一天5节，一周35节，false为没有占用

    public Teacher() {
    }

    public void setCourseNo(int x,int courseNo) {
        CourseNo.add(x,courseNo);
    }//设置所教课程编号

//    public void setCourseN(int n) {
//        CourseNo = new int[n];
//    }//设置课程数量

    public List<Integer> getCourseNo() {
        return CourseNo;
    }

    public void setCourseNo(List<Integer> courseNo) {
        CourseNo = courseNo;
    }

    public boolean getTeacherTime(int x) {
        return teacherTime[x];
    }//获取第x时间是否占用

    public void setTeacherTime(int x,boolean b) {
        this.teacherTime[x] = b;
    }//第x个占用为b

    public void setTeacherTime() {
        for(int i=0;i<35;i++)
            teacherTime[i]=false;
    }//初始化没上课

    @Override
    public String toString() {
        return "Teacher{" +
                "CourseNo=" + CourseNo +
                ", teacherTime=" + Arrays.toString(teacherTime) +
                '}';
    }
}
